#include <iostream>
#include <functional>
#include <string>
#include "Log.hpp"
using namespace LogModle;
using Task = std::function<void()>;
class Task_t
{

public:
    Task_t() {}
    Task_t(int a, int b) : _a(a), _b(b)
    {
    }
    void Excute()
    {
        _ans = _a + _b;
    }
    void ResultToString()
    {
        // return
        std::string ret=std::to_string(_a) + "+" + std::to_string(_b) + "=" + std::to_string(_ans);
        LOG(LogLever::INFO)<<ret.c_str();
        //LOG() << std::to_string(_a) + "+" + std::to_string(_b) + "=" + std::to_string(_ans);
    }
    void operator()()
    {
        Excute();
        std::string ret=std::to_string(_a) + "+" + std::to_string(_b) + "=" + std::to_string(_ans);
        LOG(LogLever::INFO)<<ret.c_str();
    }
    void DebugToString()
    {
        LOG(LogLever::DEBUG)<<std::to_string(_a) + "+" + std::to_string(_b) + "=" + "?";
    }

private:
    int _a;
    int _b;
    int _ans;
};
// std::string ResultToString()
// {
//     // return
//     LOG() << std::to_string(_a) + "+" + std::to_string(_b) + "=" + std::to_string(_ans);
// }
// std::string DebugToString()
// {
//     return std::to_string(_a) + "+" + std::to_string(_b) + "=" + "?";
// }